<template>
  <div>
    <a-card title="友情链接" :head-style="headStyle">
      <div class="link-container">
        <a v-for="item in linkList" :key="item.linkId" target="_blank" :href="item.linkUrl" v-text="item.linkName" />
      </div>
    </a-card>
  </div>
</template>
<script>
import linkApi from '@/api/link'
export default {
  data() {
    return {
      linkList: [],
      // 标题样式
      headStyle: {
        fontSize: '18px',
        fontWeight: 'bold',
        lineWeight: '15px',
        borderLeft: '5px solid #409eff'
      }
    }
  },
  created() {
    this.list()
  },
  methods: {
    list() {
      linkApi.list().then(resp => {
        this.linkList = resp.data
      })
    }
  }
}
</script>
<style scoped>
.link-container {
  display: flex;
  flex-direction: row;
}
.link-container a {
  font-size: 20px;
  margin-right: 15px;
}
</style>
